package com.cx.interact.client.admin.service.Impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cx.base.apiModel.PageModel;
import com.cx.interact.client.admin.dao.act.ActivityDAO;
import com.cx.interact.client.admin.dto.act.ActivityDTO;
import com.cx.interact.client.admin.service.ActivityService;

@Service
public class ActivityServiceImpl implements ActivityService{

	@Resource
	private ActivityDAO activityDAO;
	
	/**
	 * 查询所有活动模板
	 * */
	public PageModel queryActTemplates(Integer pageNum, Integer itemCount){
		return activityDAO.queryActTemplates(pageNum, itemCount);
	}
	
	/**
	 * 保存或更新活动
	 * */
	public ActivityDTO saveOrUpdateActivity(ActivityDTO activityDTO){
		return activityDAO.saveOrUpdateActivity(activityDTO);
	}
	
	/**
	 * 根据活动ID查询活动
	 * */
	public ActivityDTO queryActivityByActId(Integer actId){
		return activityDAO.queryActivityByActId(actId);
	}
	
	/**
	 * 根据活动ID查询活动
	 * */
	public PageModel queryActivity(Integer pageNum, Integer itemCount,Integer consumerId){
		return activityDAO.queryActivity(pageNum, itemCount, consumerId);
	}
}
